package com.hardy.job;

import java.util.Scanner;

/**
 * Author: fuxh3@lenovo.com
 * Date: Created in 2017/10/30 0030
 */
public class Test1 implements Test2{
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int N = in.nextInt();
        int a=0,b=1;
        while(b<=N){
            int b_temp = a+b;
            a=b;
            b=b_temp;
        }
        System.out.println((b-N)>(N-a)?N-a:b-N);
        int i=0;
        int j=0;
        if((++i>0)||(++j>0))
        {
            //打印出i和j的值。
            System.out.println(i);
            System.out.println(j);
        }
    }
    static void operate(StringBuffer x,StringBuffer y) {
        x.append(y);
        y=x;
    }

}
